<?php

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}
$page=$_G['gp_page']==""?1:$_G['gp_page'];
$leixing=$_G['gp_leixing']==""?1:$_G['gp_leixing'];
$rows=floor((DB::num_rows(DB::query("SELECT * FROM ".DB::table('jlcw_item')." where chushou=1 and  leixing=$leixing"))-1)/10+1);
for ($n = 1; $n <= $rows; $n++) {
	if ($page==$n){
		$fy.="<a href='javascript:;'><b><u>$n</u></b></a>";
	}else{
		$fy.="<a href='plugin.php?id=jlcw:itemshopy&page=$n' ajaxtarget='target'>$n</a>";
	}
}
if ($rows>=1){
	$fy="<a href='plugin.php?id=jlcw:itemshopy&page=1' ajaxtarget='target'><<</a>".$fy."<a href='plugin.php?id=jlcw:itemshopy&page=$rows' ajaxtarget='target'>>></a>";
}
$query = array();
$query = DB::query("SELECT * FROM ".DB::table('jlcw_item')." where chushou=1 and  leixing=$leixing  limit ".(($page-1)*10).",10");
$i=0;
while($value = DB::fetch($query)) {
	$value['i']=$i;
	$items[] = $value;
	$i++;
}
include template('jlcw:itemshopy');

?>